using System.Collections.Generic;

namespace Lottery.Client.SL
{
    public class PlayDataControl
    {
        public static List<PlayDataInfo> _PlayDataInfos;
        static PlayDataControl()
        {
            PlayDataControl._PlayDataInfos = new List<PlayDataInfo>();
        }
        public static PlayDataInfo GetPlayDataInfo(int lotteryid)
        {
            for (int i = 0; i < PlayDataControl._PlayDataInfos.Count; i++)
            {
                if (PlayDataControl._PlayDataInfos[i] != null && PlayDataControl._PlayDataInfos[i].LotteryID == lotteryid)
                {
                    return PlayDataControl._PlayDataInfos[i];
                }
            }
            PlayDataInfo playDataInfo = new PlayDataInfo(lotteryid);
            PlayDataControl._PlayDataInfos.Add(playDataInfo);
            return playDataInfo;
        }
    }
}